<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" >
<title>Introduction</title>

<link href="book.css" rel="stylesheet" type="text/css">
<link href="code.css" rel="stylesheet" type="text/css">
<link rel="home" href="00-Main.html" title="">
</head>
<body>
<a name="Introduction"></a>
<h1>Introduction</h1>
<p>
Xsemantics is a DSL (implemented in Xtext itself) for writing type systems, 
reduction rules, interpreters (and in general relation rules) for languages 
implemented in Xtext. 
A system definition in Xsemantics is a set of judgment rules which have a 
conclusion and a set of premises; these rules can act on any
Java object, though, typically, they will act on EObjects which are
elements of your Xtext language.
Xsemantics then generates Java code that can be used in your language implemented 
in Xtext for scoping and validation (it also generates a validator in Java). 
</p>
<p>
Xsemantics&apos; language relies on Xbase, so that you have a rich
syntax for the rules of your system, and you have access to all Java!
You might want to take a look at <a href="http://www.eclipse.org/Xtext/documentation/2_1_0/199e-xbase-language-reference.php">Xbase
language reference</a> before you start using Xsemantics.
</p>
<p>
Xsemantics is thought to be used by people who are at least a little familiar
with formal type systems and operational semantics: it aims at providing
a syntax which is close to the way deduction rules are written in a formal setting.
Actually, Xsemantics rules are written in the other direction with respect
to standard deduction rules: the conclusion come before the premises; this is just
to make IDE tooling work better, and to give a more "programming" style to rules.
</p>
<p>
In the following we will first give a brief description of
the shape of syntactic elements of Xsemantics, and then we will continue
with some examples.
</p>
</body>
</html>
